package cn.itcast.day08.demo05;

public class DemoMain {
    public static void main(String[] args) {
//        MyInterface obj=new MyInterfaceImpl();
//        obj.method();
        MyInterface obj = new MyInterface() {

            @Override
            public void method1() {
                System.out.println("匿名内部类实现了方法1");
            }

            @Override
            public void method2() {
                System.out.println("匿名内部类实现了方法2");
            }
        };
        obj.method1();
    }
}
